<a
  *ngIf="item.link"
  class="new-tab"
  mat-menu-item
  [id]="item.id"
  [href]="item.link"
  [target]="item.newTab ? '_blank' : '_self'"
  (click)="emitClicked()"
>
  <mat-icon
    *ngIf="item.svgIcon"
    [class]="item.iconClasses"
    [svgIcon]="item.svgIcon"
  ></mat-icon>
  <mat-icon *ngIf="item.icon" [class]="item.iconClasses">{{
    item.icon
  }}</mat-icon>
  <span class="item-link-text">
    {{ item.text }}
    <mat-icon *ngIf="item.newTab" class="new-tab-icon">launch</mat-icon>
  </span>
</a>
<button
  *ngIf="item.action"
  mat-menu-item
  [id]="item.id"
  (click)="emitClicked()"
>
  <mat-icon
    *ngIf="item.svgIcon"
    [class]="item.iconClasses"
    [svgIcon]="item.svgIcon"
  ></mat-icon>
  <mat-icon *ngIf="item.icon" [class]="item.iconClasses">{{
    item.icon
  }}</mat-icon>
  <span>{{ item.text }}</span>
</button>
